#include <iostream>
#include <vector>
using namespace std;

int main() {
    int n, k;//4 2
    cin >> n >> k;

    vector<long long> ehappy(n);
    vector<long long> eshame(n);
    vector<long long> a(n);
    vector<long long> b(n);

    for (int i = 0; i < n; i++) {
        cin >> a[i];//3 5 1 7
    }

    for (int i = 0; i < n; i++) {
        cin >> b[i];//4 5 3 2
    }

    pair<long long, int> _max = { 0, 0 };
    for (int i = 0; i < n; i++) {
        int count = 0;
        for (int j = i; j < n && count < k; j++, count++) {
            ehappy[i] += a[j];
            eshame[i] += b[j];
        }

        if (_max.first < ehappy[i])
            _max = { ehappy[i], i };
        else if (_max.first == ehappy[i]) {
            if (eshame[_max.second] > eshame[i])
                _max = { ehappy[i], i };
        }
    }

    cout << _max.second + 1 << endl;
    return 0;
}